package admin

import (
	"exercise/application/yiran/app/libs"
	"exercise/application/yiran/app/service/admin"
	"github.com/gin-gonic/gin"
)

type adminMenuController struct {
}

// List 列表
func (a *adminMenuController) List(ctx *gin.Context) {
	ret, err := admin.NewAdminMenuService(ctx).List()
	if err != nil {
		libs.Toast(ctx, err.Error())
		return
	}
	libs.Success(ctx, ret)
}

func NewAdminMenuController() *adminMenuController {
	return &adminMenuController{}
}
